import request from "@/utils/request";

const BASE_URL = "/api/v1";

const transactionApi = {
  getList(data: any) {
    return request({
      url: `${BASE_URL}/transactionRecords/mall/basePage`,
      method: "post",
      data,
    });
  },
  getDetail(id: number) {
    return request({
      url: `${BASE_URL}/transactionRecords/mall/${id}/detail`,
      method: "get",
    });
  },
  getConDynamic(data: any) {
    return request({
      url: `${BASE_URL}/conDynamic/page`,
      method: "post",
      data,
    });
  },
  getHistory(data: any) {
    return request({
      url: `${BASE_URL}/transactionRecords/mall/getHistory`,
      method: "post",
      data,
    });
  },
  exportExl(data: any) {
    return request({
      url: `${BASE_URL}/transactionRecords/export`,
      method: "post",
      data,
      responseType: "blob",
    });
  },
};

export default transactionApi;
